import axios from 'axios';
import {API_NEW_VERSION} from '../api';

export const getAllChargingFormulas = params => {
  return axios.get(API_NEW_VERSION + 'charging-formulas', {params: params});
};

export const createChargingFormula = params => {
  return axios.post(API_NEW_VERSION + 'charging-formulas', params);
};

export const updateChargingFormula = params => {
  return axios.put(API_NEW_VERSION + 'charging-formulas', params);
};

export const getChargingFormula = id => {
  return axios.get(API_NEW_VERSION + 'charging-formulas/' + id);
};

export const deleteChargingFormula = id => {
  return axios.delete(API_NEW_VERSION + 'charging-formulas/' + id);
};
